Skip to main content

Full text of "Arduino"

See other formats

Control a 5V Motor with the Arduino 


Make Projects 

build, hack, tweak, share, discover,' 

Control a 5V Motor with the 


Written By: Eric Weinhoffer 


Arduino Uno (1) 
DC motor (1) 
Diode (1N4004) (1) 
Resistor. 330Q (1) 
Transistor. NPN (1) 


All required parts are included in the Maker Shed's Ultimate Microcontroller Pack , 

© Make Projects Page 1 of 3 

Control a 5V Motor with the Arduino 

Step 1 — Control a 5V Motor with the Arduino  ■_..■ ...H ■■■*•«■ ..&..■ .1 

!■— Hill llfll lliia licit .. 

lit ■ - ■ ■ _ 
. . 

■ liIii il i r -T1-""I" 

■ii ■■■ > • i r» ■ • ■ ■ ■ ■ 
<Mff i i ■ i • ■ i ■ . 


! i i . , J 

l^alntari ■ »■ I I ^■■■■■■■■■■■R r r ■ r 

■ ■■■■>HII*F"> ■■"--'"■'"■MI^U^^HimBHJ 


■■■■■■■■nimiiinimiiiinai 4 

. ."- 




■ ■■' 



Make sure you have all the required parts before starting. Everything you need is included 
in the Ultimate Microcontroller Pack. 

First, install the transistor. With the flat part of the transistor facing away from you, the 
leftmost leg should be inserted into E20 on the breadboard, followed by the other two legs 
in E21 and E22. 

Next, install the diode. Polarity matters here, so make sure the side with the white stripe is 
in C16 and the other side is in C20. 

And now, the resistor. Plug it into pins C21 and C26 (polarity doesn't matter here). 

Step 2 


• We need to power the circuit with 5V from the Arduino. Use a jumper here, and plug into 
pin E16 on the breadboard. 

• And of course we need ground as well - use another jumper to go from the Arduino GND 
pin to A22 on the breadboard. 

• To control the speed of the motor through the transistor, use another jumper wire to go 
from Digital Pin 3 on the Arduin to pin A26 on the breadboard. 

© Make Projects 

Page 2 of 3 

Control a 5V Motor with the Arduino 

• Finally, it's time for the motor! Plug 
the power (red) wire into A16 and 
the ground (blue) into A20. 

• That's it, you're done! Head over to 
GitHub to download (or copy-paste) 
the sample code, and have fun! 

This document was last generated on 201 3-02-1 2 02:01 :48 PM. 

© Make Projects 

Page 3 of 3